﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using asMeishi.web.Models;

namespace asMeishi.web.Controllers
{
    public class tagLibraryController : Controller
    {

        DataSession<MongoDataContext, tagLibrary> db = new DataSession<MongoDataContext, tagLibrary>();
        //
        // GET: /tagLibrary/

        public ActionResult Index()
        {
            return View();
        }

        //
        // GET: /tagLibrary/Edit/5

        public ActionResult Detail(string id)
        {

            ViewData.Model = db.GetById(id);

            return View();
        }

        //
        // POST: /tagLibrary/Edit/5

        [HttpPost]
        public ActionResult Edit(string id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here
 
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /tagLibrary/Delete/5
 
        public ActionResult Delete(int id)
        {
            return View();
        }

        //
        // POST: /tagLibrary/Delete/5

        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here
 
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
